/**
 * Created with IntelliJ IDEA.
 * Description:
 */
public class TestDemo {
    public static void main(String[] args) {
        int n = 10;
        int k = 0;
        k = Sum(n);
        System.out.println(k);
    }

    public static int Sum(int n){
        if(n == 1){
            return 1;
        }else{
            return n+Sum(n-1);
        }
    }
}
